package com.aabte.auth.account.resource.facade;

import com.aabte.auth.role.application.RoleService;
import com.aabte.auth.role.domain.model.RoleId;
import com.aabte.auth.role.domain.model.RoleName;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class RoleServiceFacade {
    @Resource
    private RoleService roleService;

    public String create(String roleName) {
        return roleService.create(new RoleName(roleName)).getId();
    }

    public boolean delete(String roleId) {
        return roleService.delete(new RoleId(roleId));
    }
}
